package com.vidyu.businesslayer.businessentities;

import com.vidyu.businesslayer.businesscomponents.Constants;

import javax.persistence.*;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: eyalsa
 * Date: 3/31/13
 * Time: 5:18 PM
 * To change this template use File | Settings | File Templates.
 */
@MappedSuperclass
public abstract class User {
    private long id = Constants.NON_VALID_ID;
    private long rating;
    private long lastUsed;
    private String name;
    private String email;
    private String password;
    private String address;
    private String country;
    private int NumOfProjects;
    private int nonAgreementProjects;
    //todo - add photo
    protected Set<Project> projectSet;

    public User (){}

    protected User(String name, String email, String password, String address, String country) {
        this.name = name;
        this.email = email;
        this.password = password;
        this.address = address;
        this.country = country;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id", nullable = false, length = 11)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getRating() {
        return rating;
    }

    public void setRating(long rating) {
        this.rating = rating;
    }

    public long getLastUsed() {
        return lastUsed;
    }

    public void setLastUsed(long lastUsed) {
        this.lastUsed = lastUsed;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public int getNumOfProjects() {
        return NumOfProjects;
    }

    public void setNumOfProjects(int numOfProjects) {
        NumOfProjects = numOfProjects;
    }

    public int getNonAgreementProjects() {
        return nonAgreementProjects;
    }

    public void setNonAgreementProjects(int nonAgreementProjects) {
        this.nonAgreementProjects = nonAgreementProjects;
    }

}
